home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 February
/
EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso
/
html
/
gpsoft
/
pub
/
dopus
/
opussdk.lha
/
opussdk
/
docs
/
notify.doc
< prev
next >
Wrap
Text File
|
1996-09-05
|
7KB
|
201 lines
TABLE OF CONTENTS
dopus5.library/AddNotifyRequest
dopus5.library/RemoveNotifyRequest
dopus5.library/ReplyFreeMsg
dopus5.library/SetNotifyRequest
dopus5.library/AddNotifyRequest dopus5.library/AddNotifyRequest
NAME
AddNotifyRequest - add a request to Opus's notify chain
SYNOPSIS
AddNotifyRequest(type, userdata, port)
D0 D1 A0
APTR AddNotifyRequest(ULONG, ULONG, struct MsgPort *);
FUNCTION
Opus keeps track of several different system events, and this routine
allows you to request notification on them.
The events currently available for notification:
DN_WRITE_ICON - an icon is written to disk
DN_APP_ICON_LIST - an AppIcon is added or removed
DN_APP_MENU_LIST - an AppMenuItem is added or removed
DN_CLOSE_WORKBENCH - CloseWorkbench() has been called
DN_OPEN_WORKBENCH - OpenWorkbench() has been called
DN_RESET_WORKBENCH - the workbench screen has been closed and
re-opened
DN_DISKCHANGE - a disk has been inserted or removed
DN_DOS_ACTION - a DOS event has occurred. In Opus 5.5,
these messages are only available if the
dopus/DOSPatch environment variable is set.
DN_REXX_UP - the ARexx process has been started.
Several Opus events are also available for notification:
DN_OPUS_START - Opus has started
DN_OPUS_QUIT - Opus has quit
DN_OPUS_HIDE - Opus has been hidden
DN_OPUS_SHOW - Opus has been revealed
When an event occurs that you have requested notification for, a
DOpusNotify message is sent to your message port. The message
structure is defined as follows:
dn_Msg - Exec message header
dn_Type - Event type
dn_UserData - the userdata you supplied to AddNotifyRequest()
dn_Data - data specific to the type of event
dn_Flags - flags specific to the type of event
dn_Fib - a FileInfoBlock for some types of event
dn_Name - pathname specific to the type of event
The event-specific fields are used in the following way:
DN_WRITE_ICON
-------------
dn_Data - NULL
dn_Flags - if DNF_ICON_REMOVED is set, icon was deleted
dn_Fib - NULL
dn_Name - full pathname of icon
DN_APP_ICON_LIST
----------------
dn_Data - pointer to the AppIcon added or removed
dn_Flags - if DNF_ICON_REMOVED is set, icon was removed
if DNF_ICON_CHANGED is set, the icon image
was changed
dn_Fib - NULL
dn_Name - NULL
DN_APP_MENU_LIST
----------------
dn_Data - pointer to the AppMenuItem added or removed
dn_Flags - if DNF_ICON_REMOVED is set, item was removed
dn_Fib - NULL
dn_Name - NULL
DN_DISKCHANGE
-------------
dn_Data - disk units the change occurred in (bits 0-3
represent units 0-3)
dn_Flags - which units have disks in them (bits 0-3
represent units 0-3)
dn_Fib - NULL
dn_Name - NULL
DN_DOS_ACTION
-------------
dn_Data - NULL
dn_Flags - which DOS action occurred (see <dopus/notify.h>)
dn_Fib - FileInfoBlock with file information. This is
supplied for all actions except Delete.
dn_Name - full pathname of file involved
INPUTS
type - type of events you want to be notified of. One request can
ask for multiple events. See <dopus/notify.h> for the full
list.
userdata - a user-defined data field that is passed in any notify
messages.
port - message port to send notification messages to.
NOTES
Most notification messages are sent "reply free", meaning you must
use the ReplyFreeMsg() call to reply to them. Otherwise, the
message memory will be lost.
RESULT
Returns a notify handle which you use to remove the request.
SEE ALSO
RemoveNotifyRequest(), SetNotifyRequest()
dopus5.library/RemoveNotifyRequest dopus5.library/RemoveNotifyRequest
NAME
RemoveNotifyRequest - remove a notification request
SYNOPSIS
RemoveNotifyRequest(request)
A0
void RemoveNotifyRequest(APTR);
FUNCTION
Removes a notify request that was added with AddNotifyRequest().
INPUTS
request - request to remove
RESULT
The request is removed. You will receive no more notifications for
that request. Once you have removed the request you should check
your message port for outstanding messages and reply to them.
SEE ALSO
AddNotifyRequest()
dopus5.library/ReplyFreeMsg dopus5.library/ReplyFreeMsg
NAME
ReplyFreeMsg - reply or free a message
SYNOPSIS
ReplyFreeMsg(msg)
A0
void ReplyFreeMsg(struct Message *);
FUNCTION
If the message has a valid ReplyPort, this function simply passes it
through to ReplyMsg(). If the message has no reply port set, this
function calls FreeVec() on the message to free it.
INPUTS
msg - message to reply or free
NOTES
Most Opus notification messages are sent "reply free", meaning you
MUST use this function to reply to them or the memory will be lost.
SEE ALSO
AddNotifyRequest()
dopus5.library/SetNotifyRequest dopus5.library/SetNotifyRequest
NAME
SetNotifyRequest - change notification events
SYNOPSIS
SetNotifyRequest(request, new_type, mask)
A0 D0 D1
void SetNotifyRequest(APTR, ULONG, ULONG);
FUNCTION
This routine changes the type of events that an existing notification
request is interested in.
INPUTS
request - notification request to change
new_type - the new event flags to receive notification about
mask - mask of event flags to change (any events not specified in the
mask field will not be modified)
SEE ALSO
AddNotifyRequest()